package com.bootdo.imgtext.check.impl;

import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;

import com.bootdo.imgtext.check.CheckService;

public class CnnctyImpl extends CheckService {
	public CnnctyImpl(String url) {
		Document doc = getDoc(url);

		if (doc == null) {
			return;
		}
		String header = doc.select("div.article_header").select("p").first().text().trim();
		if (header.contains("来源")) {
			author = header.substring(header.indexOf("来源"), header.indexOf("浏览次数")).trim();
		}
		Elements imgs = doc.select("div.article_content").select("img[src]");
		checkImgs(imgs);
	}
}
